﻿using DotNetCore.CAP;
using Wq.Application;
using Wq.Model;

namespace Wq.Handler
{
    public class RegionHandler : ICapSubscribe, IAddSingleton
    {
        private readonly RegionApplication application;

        public RegionHandler(RegionApplication application) => this.application = application;

        /// <summary>
        /// 创建文件
        /// </summary>
        [CapSubscribe(CAPKey.SaveRegionFile)]
        public void SaveFile(string content = "") => application.SaveFile();
    }
} 